package com.lianyu507.task;

import com.lianyu507.pojo.DtProfessionLog;

import java.util.Date;

public class CreateLog {

    /**
     * 创建业务日志--文章统计量
     */
    public static DtProfessionLog createProfessionLog(int logType, int logId, int count, String message) {
        DtProfessionLog professionLog = new DtProfessionLog();
        Date date = new Date();
        professionLog.setLogType(logType);
        professionLog.setLogId(logId);
        professionLog.setCount(count);
        professionLog.setCreateTime(date);
        professionLog.setMessage(message);
        professionLog.setUpdateTime(date);
        professionLog.setStatus((byte) 1);
        return professionLog;
    }
/*
    *//**
     * @Title: 日志对象封装
     * @Description: 创建操作日志
     * @Date 2017/11/23 20:03
     *//*
    public static DtOperationLog createOperationLog(byte isadmin, Integer userId, String ip, String message, byte referenceType, Integer referenceId) {
        DtOperationLog dtOperationLog = new DtOperationLog();
        Date date = new Date();
        dtOperationLog.setLogName("操作日志");
        dtOperationLog.setUserId(userId);
        dtOperationLog.setIsAdmin(isadmin);
        dtOperationLog.setCreateTime(date);
        dtOperationLog.setIp(ip);
        dtOperationLog.setMessage(message);
        dtOperationLog.setUpdateTime(date);
        // 日志正常为1,删除为0
        dtOperationLog.setStatus((byte) 1);
        dtOperationLog.setReferenceType(referenceType);
        dtOperationLog.setReferenceId(referenceId);
        return dtOperationLog;
    }*/

}
